<!DOCTYPE html>
<html>
  <head>
    <meta charset="UTF-8" />
    <title></title>
  </head>
  <body>
    <input type="text" id="one" />
    <button onclick="clickMy()">点我一下</button>
    <script>
      function clickMy() {
        alert(document.getElementById("one").value);
      }
    </script>
  </body>
</html>
